package jp.tkym.labs.store;

import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;

/**
 * @author kazunari
 */
class SqliteDDLExecutor extends DefaultDDLExecutor{
	SqliteDDLExecutor(Connection connection){
		super(connection);
	}
	
	@Override
	public void truncate(TableMeta param) throws SQLException {
		Statement statement = connection.createStatement();
		statement.execute("delete from " + param.tableName());
		if(!connection.getAutoCommit()) connection.commit();
	}
}